import { makeAutoObservable } from "mobx"

import { getUserInfo as getUserInfoApi } from "@/api/main/user"

class UserStore {
  userInfo = {}
  constructor() {
    makeAutoObservable(this)
  }
  clearUserInfo() {
    this.userInfo = {}
  }
  async getUserInfo() {
    const { data } = await getUserInfoApi()
    this.userInfo = data
  }
}

export default UserStore
